package com.xnew.common.response.status;

public enum ResponseCode implements StatusCode{

    SUCCESS (0, "操作成功","SUCCESS"),
    ERROR(1, "操作失败","ERROR"),
    EXCEPTION(3, "异常","EXCEPTION"),
    INVALID_PARAM(4, "参数错误","INVALID_PARAM"),
    UPDATE_DATABASE_ERROR(5,"更新数据库失败！","UPDATE_ERROR");

    private int errorCode;
    private String errorMsg;
    private String name ;

    ResponseCode(int code, String msg, String name) {
        errorCode = code;
        errorMsg = msg;
        this.name = name;
    }

    @Override
    public String getModuleName() {
        return "系统";
    }

    @Override
    public int getOrder() {
        return Integer.MIN_VALUE;
    }

    @Override
    public int getCode() {
        return errorCode;
    }

    @Override
    public String getMsg() {
        return errorMsg;
    }

    @Override
    public String getName() {
        return name;
    }
}
